package com.ibm.mall.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibm.mall.dao.UserDao;
import com.ibm.mall.model.PageBean;
import com.ibm.mall.model.User;
import com.ibm.mall.service.UserService;
import com.ibm.mall.util.QueryHelper;

@Service
@Transactional
public class UserServiceImpl implements UserService {
	
	@Resource
	private UserDao userDao;

	@Override
	public void saveUser(User user) {
		userDao.save(user);
	}

	@Override
	public User getUserByUserAccount(String userAccount) {
		return userDao.getUserByUserAccount(userAccount);
	}

	@Override
	public void updateUser(User user) {
		userDao.update(user);
	}

	@Override
	public PageBean getPageBean(int page, int rows, QueryHelper queryHelper) {
		return userDao.getPageBean(page, rows, queryHelper);
	}

}
